<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>注册</title>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" href="/css/combine.css"/>
    <link rel="stylesheet" href="/css/kube.css">
</head>
<body>
<div id="hero">
    <div id="hero-box">
        <h1>注册</h1>
        <p>请完善您的信息</p>
    </div>
</div>
<div class="wrap content" id="content">
    <form action="" class="form" id="signupForm">
        <row>
            <column col="3">
                <label class="desc">姓</label>
                <input type="text" name="firstName">
            </column>
            <column col="3">
                <label class="desc">名</label>
                <input type="text" name="lastName">
            </column>
        </row>
        <label>电子邮件</label>

        <row>
            <input type="email" name="email">
        </row>
        <label>用户名</label>

        <row>
            <input type="text" name="username">
        </row>
        <label>密码</label>
        <row>
            <input type="password" name="password">
        </row>
        <label>性别</label>

        <row class="checkbox-list">
            <label><input type="radio" name="sex" value="男">男</label>
            <label><input type="radio" name="sex" value="女">女</label>
        </row>
        <button class="signup">注册</button>
        <a href="/signin">
            登录
        </a>
    </form>
</div>
<script src="//cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
<script>
    $(".signup").on('click', function (event) {
        event.preventDefault();
        $.post('/signup', $("#signupForm").serialize(), function (res) {
            if (res.status == 1000) {
                window.location.href = '/';
            }
        })
    })
</script>
</body>
</html>